<?php
declare (strict_types=1);

namespace app\tool\controller;

use think\Request;

class TimeController
{
    static function strToTime($time = '2024-04-04'): bool|int
    {
        return strtotime($time);
    }

    /*
     * 给你一个时间戳 求当天开始时间
     * */
    static function dayStar($time): bool|int
    {
        return strtotime('midnight', $time);
    }

    static function dayEnd($endTime)
    {
        return self::dayStar($endTime) + (24 * 60 * 60)-1;
    }
}
